<%@page import="java.io.File"%>
<%@page import="com.scrum.Object.File_Process"%>
<%@page import="com.scrum.Object.User"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<!-- Le styles -->
<link href="assets/css/bootstrap.css" rel="stylesheet">
<link href="assets/css/bootstrap-responsive.css" rel="stylesheet">
<link href="assets/css/global.css" rel="stylesheet">
<link href="assets/css/index.css" rel="stylesheet">
<link href="assets/css/edit.css" rel="stylesheet">
<link href="assets/font/font-awesome/css/font-awesome.min.css"
	rel="stylesheet">
<!--<link href="assets/css/essential/slider2.css" rel="stylesheet">
    <link href="assets/css/essential/social-icons.css" rel="stylesheet"> -->

<!-- Fav and touch icons -->
<link rel="shortcut icon" href="assets/img/favicon.png">
<!--     <link rel="apple-touch-icon-precomposed" sizes="144x144" href="http://getbootstrap.com/2.3.2/assets/ico/apple-touch-icon-144-precomposed.png">
    <link rel="apple-touch-icon-precomposed" sizes="114x114" href="http://getbootstrap.com/2.3.2/assets/ico/apple-touch-icon-114-precomposed.png">
    <link rel="apple-touch-icon-precomposed" sizes="72x72" href="http://getbootstrap.com/2.3.2/assets/ico/apple-touch-icon-72-precomposed.png">
    <link rel="apple-touch-icon-precomposed" href="http://getbootstrap.com/2.3.2/assets/ico/apple-touch-icon-57-precomposed.png"> -->
<!--    <style type="text/css" id="holderjs-style">.holderjs-fluid {font-size:16px;font-weight:bold;text-align:center;font-family:sans-serif;margin:0}</style> -->
<style>
.boder-from {
	border: 1px solid #FFFF;
}
</style>
</head>
<body>
	<div class="navbar-wrapper">
		<!-- Wrap the .navbar in .container to center it within the absolutely positioned parent. -->
		<!-- <div class="container"> -->

		<!-- <a class="brand" href="#"><img src="assets/img/logo.png" width='80px' height='75px'></a> -->
		<div class="navbar navbar-default navbar-static-top">
			<div class="navbar-inner-top">
				<div class="container">
					<!-- Responsive Navbar Part 1: Button for triggering responsive navbar (not covered in tutorial). Include responsive CSS to utilize. -->
					<button type="button" class="btn btn-navbar" data-toggle="collapse"
						data-target=".nav-collapse">
						<span class="icon-bar"></span> <span class="icon-bar"></span> <span
							class="icon-bar"></span>
					</button>
					<!-- Responsive Navbar Part 2: Place all navbar contents you want collapsed withing .navbar-collapse.collapse. -->
					<a class="brand" href="#"><img src="assets/img/logo.png"
						width='115px' height='115px' /></a>
					<div class="nav-collapse collapse">
						<ul class="nav">
							<!-- <li class="active"><a href="#">Home</a></li> -->
							<!-- Read about Bootstrap dropdowns at http://twbs.github.com/bootstrap/javascript.html#dropdowns -->
							<li class="dropdown"><a href="#" class="dropdown-toggle"
								data-toggle="dropdown">Đà Nẵng <b class="caret"></b></a>
								<ul class="dropdown-menu">
									<li><a href="#">Hà Nội</a></li>
									<li><a href="#">Hải Phòng</a></li>
									<li class="divider"></li>
									<!-- <li class="nav-header">Nav header</li> -->
									<li><a href="#">Huế</a></li>
									<li><a href="#">Đà Nẵng</a></li>
									<li class="divider"></li>
									<li><a href="#">TP. Hồ Chí Minh</a></li>
									<li><a href="#">Cần Thơ</a></li>
								</ul></li>
						</ul>
						<ul class="nav pull-right" style="left: 0;">
							<li><a href="#login" data-toggle="modal"
								data-target="#register">Register</a></li>

							<li><a href="#login" data-toggle="modal"
								data-target="#myDetail">Login</a></li>
						</ul>
					</div>
					<!--/.nav-collapse -->
				</div>
			</div>
			<!-- /.navbar-inner -->
		</div>
		<!-- /.navbar -->

		<!-- </div> /.container -->
		<div class="navbar navbar-default navbar-static-top">
			<div class="navbar-inner">
				<div class="container">
					<div class="nav-collapse collapse">
						<ul class="nav">
							<li class="current"><a href="#restaurants">Foods</a></li>
							<li><a href="#recipes">Rests</a></li>
							<li><a href="#about">Entertainments</a></li>
						</ul>
					</div>
				</div>
			</div>
		</div>
	</div>
	<!-- /.navbar-wrapper -->

	<%
		User user = (User) session.getAttribute("currentuser");
	int user_id = user.getId();
		String filePath = "image" + File.separator + user.getImage();
	%>

	<div class="boder-from">
		<form style="margin: 80px; padding: 40px;" id="update_form"
			method="post" action="update_user?userid=<%=user_id%>"
			"  enctype="multipart/form-data">
			<h2
				style="font-family: Helvetica Neue, Helvetica, Arial, sans-serif; color: #0088cc;">Edit
				Profile</h2>
			<label>Name</label> <input type="text" class="form-control"
				name="username" placeholder="Username" required="" autofocus="true"
				value="<%=user.getUsername()%>" /> <input type="text"
				class="form-control" name="fullname" placeholder="Full name"
				required="" autofocus="true" value="<%=user.getFullname()%>" /> <label>Password</label>
			<input type="password" class="form-control" placeholder="Password"
				name="password" required="" value="<%=user.getPassword()%>" />
			<%
				if (user.getGender().equals("male")) {
			%>
			<div class="gender">
				<input type="radio" value="male" id="male" name="gender" checked />
				<label for="male" class="radio">Male</label> <input type="radio"
					value="female" id="female" name="gender" /> <label for="female"
					class="radio">Female</label>
			</div>
			<%
				} else {
			%>

			<div class="gender">
				<input type="radio" value="male" id="male" name="gender" /> <label
					for="male" class="radio">Male</label> <input type="radio"
					value="female" id="female" name="gender" checked /> <label
					for="female" class="radio">Female</label>
			</div>
			<%
				}
			%>
			<label>Adress</label> <input type="text" class="form-control"
				autofocus="true" name="address" value="<%=user.getAddress()%>" /> <label>Email</label>
			<input type="text" class="form-control" name="email"
				placeholder="gmail.com" required="" autofocus="true"
				value="<%=user.getEmail()%>" /> <img alt="" src="<%=filePath%>"
				height="150" width="150" /> <input type="file" name="browse_user"
				size="50" class="btn btn-primary" /> <input type="submit"
				value="Update User" />
		</form>
	</div>
</body>
</html>